package com.ht.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ht.dto.Prescription;
import com.ht.mapper.PrescriptionMapper;
import com.ht.service.IPrescriptionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 代齐园
 * @since 2022-05-25
 */
@Service
public class PrescriptionServiceImpl extends ServiceImpl<PrescriptionMapper, Prescription> implements IPrescriptionService {

    @Resource
    private PrescriptionMapper prescriptionMapper;

    @Override
    public List<Prescription> getPrescription(Long id) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("user_id",id);
        List<Prescription> list = prescriptionMapper.selectList(queryWrapper);
        return list;
    }

}